<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.sinodata.bsm.common.vo.*"%>
<%@ include file="../include/taglib.jsp"%>
<%
    response.setHeader("Cache-Control", "no-store");
    response.setHeader("Pragrma", "no-cache");
    response.setDateHeader("Expires", 0);
    Long resid = Long.parseLong(request.getParameter("id"));
    List<Attribute> attributes = (List<Attribute>) request.getAttribute("attributes");
    Map<Long, String> map = (Map<Long, String>) request.getAttribute("attVals");
   
   	request.setAttribute("resId", resid);
   	request.setAttribute("flashPath",  request.getContextPath()+"/resources/flash");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>性能图页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<%@ include file="../include/common.jsp"%>


<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/style/default/bsm/sub_menu.css" />
	
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/style/default/bsm/perf/listPage.css" />
<style type="text/css" media="screen">
html,body {
	height: 100%;
}

body {
	margin: 0;
	padding: 0;
	overflow: auto;
	text-align: center;
	background-color: #ffffff;
}

object:focus {
	outline: none;
}

#flashContent {
	display: '';
	height:100%;
}

</style>

<!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
<!-- BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css"
	href="${flashPath}/history/history.css" />
<script type="text/javascript" src="${flashPath}/history/history.js"></script>
<!-- END Browser History required section -->

<script type="text/javascript" src="${flashPath}/swfobject.js"></script>
   <script type="text/javascript">
            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
            var swfVersionStr = "0.0.0";
            // To use express install, set to playerProductInstall.swf, otherwise the empty string. 
            var xiSwfUrlStr = "${flashPath}/playerProductInstall.swf";
            var flashvars = {};
     		flashvars.flashPath="${flashPath}";
     		flashvars.reqPath="${pageContext.request.contextPath}";
     		flashvars.resTypeId="${resTypeId}";
     		flashvars.resId="${resId}";
            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            params.wmode = "transparent";
            var attributes = {};
            attributes.id = "RealTimeView";
            attributes.name = "RealTimeView";
            attributes.align = "middle";
            swfobject.embedSWF(
                "${flashPath}/RealTimeView.swf", "flashContent", 
                "100%", "100%", 
                swfVersionStr, xiSwfUrlStr, 
                flashvars, params, attributes);
            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
	
	$(document).ready(function() {
		$('.perf').click(function(){
			$.ajax({
				type : "POST",
				url : "real-time!savePerfMenu.action",
				data : "perfid=" + $(this).attr("id")
			});
		});
	});

	function changeRes(resId,resTypeId){
		RealTimeView.displayRes(resId,resTypeId);
	}
</script>
</head>
<body>

	
	<div id="flashContent">
		<p>To view this page ensure that Adobe Flash Player version 11.1.0
			or greater is installed.</p>
		<script type="text/javascript">
			var pageHost = ((document.location.protocol == "https:") ? "https://"
					: "http://");
			document
					.write("<a href='http://www.adobe.com/go/getflashplayer'>Get Adobe Flash player</a>");
		</script>
	</div>
</body>
</html>